﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<MuaChung.Models.CouponDetail>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	CreateCoupon
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <div id="Message">
        <%: ViewData["message"] %>
    </div>

    <% using (Html.BeginForm()) {%>
        <%: Html.ValidationSummary(true) %>

        <fieldset>
            <legend>Thêm Coupon</legend>
            <table>
                <tr>
                     <td class="editor-label">
                        Mã Coupon:
                    </td>
                    <td class="editor-field">
                        <%: Html.TextBoxFor(model => model.maCoupon) %>
                        <%: Html.ValidationMessageFor(model => model.maCoupon) %>
                    </td>
                </tr>
                <tr>
                    <td class="editor-label">
                       Tên sản phẩm: 
                    </td>
                    <td class="editor-field">
                        <%: Html.TextBoxFor(model => model.tenSP) %>
                        <%: Html.ValidationMessageFor(model => model.tenSP) %>
                    </td>
                </tr>
                <tr>
                     <td class="editor-label">
                        Số lượng cần mua:
                    </td>
                    <td class="editor-field">
                        <%: Html.TextBoxFor(model => model.soLuongCanMua) %>
                        <%: Html.ValidationMessageFor(model => model.soLuongCanMua) %>
                    </td>
                </tr>
                
                <tr>
                    <td class="editor-label">
                       Số lượng Coupon: 
                    </td>
                    <td class="editor-field">
                        <%: Html.TextBoxFor(model => model.soLuongCoupon) %>
                        <%: Html.ValidationMessageFor(model => model.soLuongCoupon) %>
                    </td>
                </tr>
                <tr>
                    <td class="editor-label">
                       Giá tốt:
                    </td>
                    <td class="editor-field">
                        <%: Html.TextBoxFor(model => model.giaTot) %>
                        <%: Html.ValidationMessageFor(model => model.giaTot) %>
                    </td>
                </tr>
                <tr>
                    <td class="editor-label">
                       Giá gốc:
                    </td>
                    <td class="editor-field">
                        <%: Html.TextBoxFor(model => model.giaGoc) %>
                        <%: Html.ValidationMessageFor(model => model.giaGoc) %>
                    </td>
                </tr>                
                <tr>
                    <td class="editor-label">
                        Thời gian bắt đầu:
                    </td>
                    <td class="editor-field">
                        <%: Html.EditorFor(model => model.tgBatDau) %>
                        <%: Html.ValidationMessageFor(model => model.tgBatDau) %>
                    </td>
                </tr>
                <tr>
                    <td class="editor-label">
                        Thời gian kết thúc:
                    </td>
                    <td class="editor-field">
                        <%: Html.EditorFor(model => model.tgKetThuc) %>
                        <%: Html.ValidationMessageFor(model => model.tgKetThuc) %>
                    </td>
                </tr>
                <tr>
                    <td class="editor-label">
                       Thời gian được sử dụng
                    </td>
                    <td class="editor-field">
                        <%: Html.EditorFor(model => model.tgDuocSuDung) %>
                        <%: Html.ValidationMessageFor(model => model.tgDuocSuDung) %>
                    </td>
                </tr>
                <tr>
                    <td class="editor-label">
                        Thời gian hết hạn:
                    </td>
                    <td class="editor-field">
                        <%: Html.EditorFor(model => model.tgHetHan) %>
                        <%: Html.ValidationMessageFor(model => model.tgHetHan) %>
                    </td>
                </tr>                                            
            </table>   
            <div class="editor-label">
                        Mô tả:
                      </div>
                    <div class="editor-field">
                        <form id="Form1" runat=server>
                        <CKEditor:CKEditorControl ID="moTa" Width="500px" Height="100px" ToolbarStartupExpanded="false" UIColor="Green" name="moTa" runat="server"></CKEditor:CKEditorControl>
                        
                    </div>      
            <div class="editor-label">
                  Điều kiện:
             </div>
             <div class="editor-field">
                        <%--<form id="Form2" runat=server>--%>
                        <CKEditor:CKEditorControl ID="dieukien" Width="500px" Height="100px" ToolbarStartupExpanded="false" UIColor="Green" name="dieukien" runat="server"></CKEditor:CKEditorControl>
                        </form>
                    </div>            
                                                                                                                                      
            <p>
                <input type="submit" value="Create" />
            </p>
        </fieldset>

    <% } %>

    <div>
        <%: Html.ActionLink("Back to List", "Index") %>
    </div>

</asp:Content>

